<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class StudyStudentAction extends Validate
{
    protected $rule = ['student_id' => 'require|number','action_type' => 'require|number','action_id' => 'require|number','add_time' => 'require|number',
    ];

    protected $message = ['student_id.require' => '班级ID为必填项','student_id.number' => '班级ID需为数字','action_type.require' => '活动类型,1=活动情况,2=更换尿布,3=喂奶情况,4=用餐情况,5=用药情况,6=睡觉情况,7=清洁情况,8=饮品情况,9=便便情况,10=情绪情况,11=到校情况,12=离校情况,13=离校时间,14=体温,15=突发事件,16=行为观察,17=添置,18=备注,19=缺勤,20=视频,21=健康,22=发展学习,23=更换衣物,24=如厕记录,25=今日日记为必填项','action_type.number' => '活动类型,1=活动情况,2=更换尿布,3=喂奶情况,4=用餐情况,5=用药情况,6=睡觉情况,7=清洁情况,8=饮品情况,9=便便情况,10=情绪情况,11=到校情况,12=离校情况,13=离校时间,14=体温,15=突发事件,16=行为观察,17=添置,18=备注,19=缺勤,20=视频,21=健康,22=发展学习,23=更换衣物,24=如厕记录,25=今日日记需为数字','action_id.require' => '活动id为必填项','action_id.number' => '活动id需为数字','add_time.require' => '发布时间为必填项','add_time.number' => '发布时间需为数字',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['student_id','action_type','action_id','add_time',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['student_id','action_type','action_id','add_time',]);
    }
}
